<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<input type="text" class="num1">
	<input type="button" value="猜" class="rel">
	<script src="../JQuery/jquery-1.11.1.js"></script>
	<script>
		var b = Math.floor(Math.random()*100+1)
		var res=""
		console.log(b)
		 $(".rel").click(function(){
		 var a = Number($(".num1").val())
		 
		

		function guess(){
		 		 if (NUM== b){ 
	 		 	res="对了"
	 		 }else if (NUM>b){
	 		 	res="大于"
			 }else if (NUM<b){
		 	res="小于"}
		 	return res
	}	
	 alert(guess(a))
		})
	</script>
</body>
</html>